<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="box">12</div>
    <script>
        function effect() {
            document.body.innerHTML = '123'
        }
        function getValue() {
            console.log(document.body.innerHTML);
        }
        effect()
        getValue()

        // ----------------------------
        let obj = {
            text: '123'
        }
        function effect2() {
            document.getElementById(box).innerHTML = obj.text
        }
        effect2()
        obj.text = '456'
    </script>
</body>

</html>